/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ToolsFrame.java
 *
 * Created on Apr 7, 2011, 8:58:16 AM
 */

package gbbmgmt;

import org.jdesktop.application.Action;
import java.text.*;

/**
 *
 * @author dchapman
 */
public class ToolsFrame extends javax.swing.JFrame {

    //Create Number Formater for displaying numbers.
    NumberFormat f0 = new DecimalFormat("#0");
    NumberFormat f1 = new DecimalFormat("#0.0");
    NumberFormat f2 = new DecimalFormat("#0.00");
    NumberFormat f3 = new DecimalFormat("#0.000");

    /** Creates new form ToolsFrame */
    public ToolsFrame() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroupOG = new javax.swing.ButtonGroup();
        buttonGroupTG = new javax.swing.ButtonGroup();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jTextFieldOG = new javax.swing.JTextField();
        jTextFieldTG = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jTextFieldOGTemp = new javax.swing.JTextField();
        jTextFieldTGTemp = new javax.swing.JTextField();
        jButtonCalcStats = new javax.swing.JButton();
        jRadioButtonOGF = new javax.swing.JRadioButton();
        jRadioButtonOGC = new javax.swing.JRadioButton();
        jRadioButtonTGF = new javax.swing.JRadioButton();
        jRadioButtonTGC = new javax.swing.JRadioButton();
        jSeparator1 = new javax.swing.JSeparator();
        jLabelOG = new javax.swing.JLabel();
        jLabelTG = new javax.swing.JLabel();
        jLabelOGCor = new javax.swing.JLabel();
        jLabelTGCor = new javax.swing.JLabel();
        jLabelOG1 = new javax.swing.JLabel();
        jLabelOG2 = new javax.swing.JLabel();
        jLabelABW = new javax.swing.JLabel();
        jLabelABV = new javax.swing.JLabel();
        jLabelTG1 = new javax.swing.JLabel();
        jLabelADA = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jTextFieldVolume = new javax.swing.JTextField();
        jTextFieldTCarb = new javax.swing.JTextField();
        jTextFieldNatCarb = new javax.swing.JTextField();
        jTextFieldSG = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabelVolGal = new javax.swing.JLabel();
        jLabelPlato = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabelVolL = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jButtonCalcPriming = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JSeparator();
        jLabel14 = new javax.swing.JLabel();
        jLabelTotVol = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabelSugar = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabelPitchRate = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabelCells = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabelTotalCells = new javax.swing.JLabel();
        jSeparator3 = new javax.swing.JSeparator();
        jPanel10 = new javax.swing.JPanel();
        jLabel27 = new javax.swing.JLabel();
        jLabelPrimeSugar = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jLabelPrimeWater = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        jLabel24 = new javax.swing.JLabel();
        jLabelYeastGrams = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        jLabelHydSolution = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        jLabelHydSugar = new javax.swing.JLabel();
        jLabel36 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel22 = new javax.swing.JLabel();
        jTextFieldPtoG = new javax.swing.JTextField();
        jLabel28 = new javax.swing.JLabel();
        jTextFieldGtoP = new javax.swing.JTextField();
        jPanel6 = new javax.swing.JPanel();
        jLabel31 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jTextFieldLtoK = new javax.swing.JTextField();
        jTextFieldKtoL = new javax.swing.JTextField();
        jPanel5 = new javax.swing.JPanel();
        jLabel29 = new javax.swing.JLabel();
        jTextFieldHecto = new javax.swing.JTextField();
        jLabelGallon = new javax.swing.JLabel();
        jTextFieldGallon = new javax.swing.JTextField();
        jLabelGallon1 = new javax.swing.JLabel();
        jTextFieldBBL = new javax.swing.JTextField();
        jLabelGallon2 = new javax.swing.JLabel();
        jTextFieldLiter = new javax.swing.JTextField();
        jPanel7 = new javax.swing.JPanel();
        jLabel30 = new javax.swing.JLabel();
        jTextFieldmL = new javax.swing.JTextField();
        jLabel38 = new javax.swing.JLabel();
        jTextFieldOz = new javax.swing.JTextField();
        jLabel39 = new javax.swing.JLabel();
        jTextFieldQuarts = new javax.swing.JTextField();
        jLabel40 = new javax.swing.JLabel();
        jTextFieldGal = new javax.swing.JTextField();
        jPanel8 = new javax.swing.JPanel();
        jLabel41 = new javax.swing.JLabel();
        jTextFieldmg = new javax.swing.JTextField();
        jLabel42 = new javax.swing.JLabel();
        jTextFieldgram = new javax.swing.JTextField();
        jLabel43 = new javax.swing.JLabel();
        jTextFieldounces = new javax.swing.JTextField();
        jPanel9 = new javax.swing.JPanel();
        jLabel44 = new javax.swing.JLabel();
        jTextFieldC = new javax.swing.JTextField();
        jLabel45 = new javax.swing.JLabel();
        jTextFieldF = new javax.swing.JTextField();
        jButtonExitTools = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setName("Form"); // NOI18N

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(gbbmgmt.GBBMGMTApp.class).getContext().getResourceMap(ToolsFrame.class);
        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jTextFieldOG.setText(resourceMap.getString("jTextFieldOG.text")); // NOI18N
        jTextFieldOG.setName("jTextFieldOG"); // NOI18N

        jTextFieldTG.setName("jTextFieldTG"); // NOI18N

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jTextFieldOGTemp.setText(resourceMap.getString("jTextFieldOGTemp.text")); // NOI18N
        jTextFieldOGTemp.setName("jTextFieldOGTemp"); // NOI18N

        jTextFieldTGTemp.setText(resourceMap.getString("jTextFieldTGTemp.text")); // NOI18N
        jTextFieldTGTemp.setName("jTextFieldTGTemp"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(gbbmgmt.GBBMGMTApp.class).getContext().getActionMap(ToolsFrame.class, this);
        jButtonCalcStats.setAction(actionMap.get("CalcStats")); // NOI18N
        jButtonCalcStats.setText(resourceMap.getString("jButtonCalcStats.text")); // NOI18N
        jButtonCalcStats.setName("jButtonCalcStats"); // NOI18N

        buttonGroupOG.add(jRadioButtonOGF);
        jRadioButtonOGF.setSelected(true);
        jRadioButtonOGF.setText(resourceMap.getString("jRadioButtonOGF.text")); // NOI18N
        jRadioButtonOGF.setName("jRadioButtonOGF"); // NOI18N

        buttonGroupOG.add(jRadioButtonOGC);
        jRadioButtonOGC.setText(resourceMap.getString("jRadioButtonOGC.text")); // NOI18N
        jRadioButtonOGC.setName("jRadioButtonOGC"); // NOI18N

        buttonGroupTG.add(jRadioButtonTGF);
        jRadioButtonTGF.setSelected(true);
        jRadioButtonTGF.setText(resourceMap.getString("jRadioButtonTGF.text")); // NOI18N
        jRadioButtonTGF.setName("jRadioButtonTGF"); // NOI18N

        buttonGroupTG.add(jRadioButtonTGC);
        jRadioButtonTGC.setText(resourceMap.getString("jRadioButtonTGC.text")); // NOI18N
        jRadioButtonTGC.setName("jRadioButtonTGC"); // NOI18N

        jSeparator1.setName("jSeparator1"); // NOI18N

        jLabelOG.setText(resourceMap.getString("jLabelOG.text")); // NOI18N
        jLabelOG.setName("jLabelOG"); // NOI18N

        jLabelTG.setText(resourceMap.getString("jLabelTG.text")); // NOI18N
        jLabelTG.setName("jLabelTG"); // NOI18N

        jLabelOGCor.setText(resourceMap.getString("jLabelOGCor.text")); // NOI18N
        jLabelOGCor.setName("jLabelOGCor"); // NOI18N

        jLabelTGCor.setText(resourceMap.getString("jLabelTGCor.text")); // NOI18N
        jLabelTGCor.setName("jLabelTGCor"); // NOI18N

        jLabelOG1.setText(resourceMap.getString("jLabelOG1.text")); // NOI18N
        jLabelOG1.setName("jLabelOG1"); // NOI18N

        jLabelOG2.setText(resourceMap.getString("jLabelOG2.text")); // NOI18N
        jLabelOG2.setName("jLabelOG2"); // NOI18N

        jLabelABW.setText(resourceMap.getString("jLabelABW.text")); // NOI18N
        jLabelABW.setName("jLabelABW"); // NOI18N

        jLabelABV.setText(resourceMap.getString("jLabelABV.text")); // NOI18N
        jLabelABV.setName("jLabelABV"); // NOI18N

        jLabelTG1.setText(resourceMap.getString("jLabelTG1.text")); // NOI18N
        jLabelTG1.setName("jLabelTG1"); // NOI18N

        jLabelADA.setText(resourceMap.getString("jLabelADA.text")); // NOI18N
        jLabelADA.setName("jLabelADA"); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jTextFieldOG, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldOGTemp, javax.swing.GroupLayout.DEFAULT_SIZE, 88, Short.MAX_VALUE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jTextFieldTG, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldTGTemp, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jRadioButtonOGF)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jRadioButtonOGC))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jRadioButtonTGF)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jRadioButtonTGC)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButtonCalcStats)
                .addContainerGap(54, Short.MAX_VALUE))
            .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 653, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabelOG1)
                    .addComponent(jLabelOG))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabelOGCor)
                        .addGap(40, 40, 40)
                        .addComponent(jLabelTG))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabelABW)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelOG2)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabelTGCor)
                        .addGap(40, 40, 40)
                        .addComponent(jLabelTG1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabelADA))
                    .addComponent(jLabelABV))
                .addContainerGap(133, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(jTextFieldOG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3)
                            .addComponent(jRadioButtonOGF)
                            .addComponent(jRadioButtonOGC)
                            .addComponent(jTextFieldOGTemp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(jTextFieldTG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4)
                            .addComponent(jTextFieldTGTemp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jRadioButtonTGF)
                            .addComponent(jRadioButtonTGC)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(jButtonCalcStats)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelOG)
                    .addComponent(jLabelOGCor)
                    .addComponent(jLabelTG)
                    .addComponent(jLabelTGCor)
                    .addComponent(jLabelTG1)
                    .addComponent(jLabelADA))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelOG1)
                    .addComponent(jLabelOG2)
                    .addComponent(jLabelABW)
                    .addComponent(jLabelABV))
                .addContainerGap(296, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

        jPanel2.setName("jPanel2"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        jTextFieldVolume.setText(resourceMap.getString("jTextFieldVolume.text")); // NOI18N
        jTextFieldVolume.setName("jTextFieldVolume"); // NOI18N

        jTextFieldTCarb.setText(resourceMap.getString("jTextFieldTCarb.text")); // NOI18N
        jTextFieldTCarb.setName("jTextFieldTCarb"); // NOI18N

        jTextFieldNatCarb.setText(resourceMap.getString("jTextFieldNatCarb.text")); // NOI18N
        jTextFieldNatCarb.setName("jTextFieldNatCarb"); // NOI18N

        jTextFieldSG.setText(resourceMap.getString("jTextFieldSG.text")); // NOI18N
        jTextFieldSG.setName("jTextFieldSG"); // NOI18N

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        jLabelVolGal.setText(resourceMap.getString("jLabelVolGal.text")); // NOI18N
        jLabelVolGal.setName("jLabelVolGal"); // NOI18N

        jLabelPlato.setText(resourceMap.getString("jLabelPlato.text")); // NOI18N
        jLabelPlato.setName("jLabelPlato"); // NOI18N

        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        jLabelVolL.setText(resourceMap.getString("jLabelVolL.text")); // NOI18N
        jLabelVolL.setName("jLabelVolL"); // NOI18N

        jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
        jLabel18.setName("jLabel18"); // NOI18N

        jButtonCalcPriming.setAction(actionMap.get("CalcPriming")); // NOI18N
        jButtonCalcPriming.setText(resourceMap.getString("jButtonCalcPriming.text")); // NOI18N
        jButtonCalcPriming.setName("jButtonCalcPriming"); // NOI18N

        jSeparator2.setName("jSeparator2"); // NOI18N

        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N

        jLabelTotVol.setText(resourceMap.getString("jLabelTotVol.text")); // NOI18N
        jLabelTotVol.setName("jLabelTotVol"); // NOI18N

        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N

        jLabelSugar.setText(resourceMap.getString("jLabelSugar.text")); // NOI18N
        jLabelSugar.setName("jLabelSugar"); // NOI18N

        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
        jLabel17.setName("jLabel17"); // NOI18N

        jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
        jLabel19.setName("jLabel19"); // NOI18N

        jLabelPitchRate.setText(resourceMap.getString("jLabelPitchRate.text")); // NOI18N
        jLabelPitchRate.setName("jLabelPitchRate"); // NOI18N

        jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
        jLabel20.setName("jLabel20"); // NOI18N

        jLabelCells.setText(resourceMap.getString("jLabelCells.text")); // NOI18N
        jLabelCells.setName("jLabelCells"); // NOI18N

        jLabel21.setText(resourceMap.getString("jLabel21.text")); // NOI18N
        jLabel21.setName("jLabel21"); // NOI18N

        jLabelTotalCells.setText(resourceMap.getString("jLabelTotalCells.text")); // NOI18N
        jLabelTotalCells.setName("jLabelTotalCells"); // NOI18N

        jSeparator3.setName("jSeparator3"); // NOI18N

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel10.border.title"))); // NOI18N
        jPanel10.setName("jPanel10"); // NOI18N

        jLabel27.setFont(resourceMap.getFont("jLabel27.font")); // NOI18N
        jLabel27.setText(resourceMap.getString("jLabel27.text")); // NOI18N
        jLabel27.setName("jLabel27"); // NOI18N

        jLabelPrimeSugar.setFont(resourceMap.getFont("jLabelPrimeSugar.font")); // NOI18N
        jLabelPrimeSugar.setText(resourceMap.getString("jLabelPrimeSugar.text")); // NOI18N
        jLabelPrimeSugar.setName("jLabelPrimeSugar"); // NOI18N

        jLabel32.setFont(resourceMap.getFont("jLabel32.font")); // NOI18N
        jLabel32.setText(resourceMap.getString("jLabel32.text")); // NOI18N
        jLabel32.setName("jLabel32"); // NOI18N

        jLabel23.setFont(resourceMap.getFont("jLabel23.font")); // NOI18N
        jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
        jLabel23.setName("jLabel23"); // NOI18N

        jLabelPrimeWater.setFont(resourceMap.getFont("jLabelPrimeWater.font")); // NOI18N
        jLabelPrimeWater.setText(resourceMap.getString("jLabelPrimeWater.text")); // NOI18N
        jLabelPrimeWater.setName("jLabelPrimeWater"); // NOI18N

        jLabel33.setFont(resourceMap.getFont("jLabel33.font")); // NOI18N
        jLabel33.setText(resourceMap.getString("jLabel33.text")); // NOI18N
        jLabel33.setName("jLabel33"); // NOI18N

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel23)
                    .addComponent(jLabel27))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jLabelPrimeSugar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel32))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jLabelPrimeWater)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel33)))
                .addContainerGap(359, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelPrimeSugar)
                    .addComponent(jLabel32)
                    .addComponent(jLabel27))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel23)
                    .addComponent(jLabelPrimeWater)
                    .addComponent(jLabel33))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel11.border.title"))); // NOI18N
        jPanel11.setName("jPanel11"); // NOI18N

        jLabel24.setFont(resourceMap.getFont("jLabel24.font")); // NOI18N
        jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
        jLabel24.setName("jLabel24"); // NOI18N

        jLabelYeastGrams.setFont(resourceMap.getFont("jLabelYeastGrams.font")); // NOI18N
        jLabelYeastGrams.setText(resourceMap.getString("jLabelYeastGrams.text")); // NOI18N
        jLabelYeastGrams.setName("jLabelYeastGrams"); // NOI18N

        jLabel34.setFont(resourceMap.getFont("jLabel34.font")); // NOI18N
        jLabel34.setText(resourceMap.getString("jLabel34.text")); // NOI18N
        jLabel34.setName("jLabel34"); // NOI18N

        jLabel25.setFont(resourceMap.getFont("jLabel25.font")); // NOI18N
        jLabel25.setText(resourceMap.getString("jLabel25.text")); // NOI18N
        jLabel25.setName("jLabel25"); // NOI18N

        jLabelHydSolution.setFont(resourceMap.getFont("jLabelHydSolution.font")); // NOI18N
        jLabelHydSolution.setText(resourceMap.getString("jLabelHydSolution.text")); // NOI18N
        jLabelHydSolution.setName("jLabelHydSolution"); // NOI18N

        jLabel35.setFont(resourceMap.getFont("jLabel35.font")); // NOI18N
        jLabel35.setText(resourceMap.getString("jLabel35.text")); // NOI18N
        jLabel35.setName("jLabel35"); // NOI18N

        jLabel26.setFont(resourceMap.getFont("jLabel26.font")); // NOI18N
        jLabel26.setText(resourceMap.getString("jLabel26.text")); // NOI18N
        jLabel26.setName("jLabel26"); // NOI18N

        jLabelHydSugar.setFont(resourceMap.getFont("jLabelHydSugar.font")); // NOI18N
        jLabelHydSugar.setText(resourceMap.getString("jLabelHydSugar.text")); // NOI18N
        jLabelHydSugar.setName("jLabelHydSugar"); // NOI18N

        jLabel36.setFont(resourceMap.getFont("jLabel36.font")); // NOI18N
        jLabel36.setText(resourceMap.getString("jLabel36.text")); // NOI18N
        jLabel36.setName("jLabel36"); // NOI18N

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel26)
                    .addComponent(jLabel25)
                    .addComponent(jLabel24))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jLabelYeastGrams)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel34))
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jLabelHydSolution)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel35))
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jLabelHydSugar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel36)))
                .addContainerGap(343, Short.MAX_VALUE))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel24)
                    .addComponent(jLabelYeastGrams)
                    .addComponent(jLabel34))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25)
                    .addComponent(jLabelHydSolution)
                    .addComponent(jLabel35))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(jLabelHydSugar)
                    .addComponent(jLabel36)))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jTextFieldTCarb, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel11))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jTextFieldNatCarb, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel12))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jTextFieldVolume, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel9))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jTextFieldSG, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel10)))
                        .addGap(2, 2, 2)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabelPlato)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel16))
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(jLabelVolGal)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel13)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabelVolL)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel18)))))
                .addContainerGap(243, Short.MAX_VALUE))
            .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 653, Short.MAX_VALUE)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabelTotVol))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel19)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabelPitchRate)))
                .addGap(34, 34, 34)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel20)
                        .addGap(6, 6, 6)
                        .addComponent(jLabelCells))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel15)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabelSugar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel17)))
                .addContainerGap(219, Short.MAX_VALUE))
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel21)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabelTotalCells)
                .addContainerGap(515, Short.MAX_VALUE))
            .addComponent(jSeparator3, javax.swing.GroupLayout.DEFAULT_SIZE, 653, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel11, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButtonCalcPriming)
                .addContainerGap(566, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(jTextFieldVolume, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9)
                    .addComponent(jLabelVolGal)
                    .addComponent(jLabel13)
                    .addComponent(jLabelVolL)
                    .addComponent(jLabel18))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(jTextFieldTCarb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(jTextFieldNatCarb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(jTextFieldSG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10)
                    .addComponent(jLabelPlato)
                    .addComponent(jLabel16))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(jLabelTotVol)
                    .addComponent(jLabel15)
                    .addComponent(jLabelSugar)
                    .addComponent(jLabel17))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(jLabelPitchRate)
                    .addComponent(jLabel20)
                    .addComponent(jLabelCells))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(jLabelTotalCells))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 5, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonCalcPriming)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N

        jPanel3.setName("jPanel3"); // NOI18N

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel4.border.title"))); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N

        jLabel22.setText(resourceMap.getString("jLabel22.text")); // NOI18N
        jLabel22.setName("jLabel22"); // NOI18N

        jTextFieldPtoG.setText(resourceMap.getString("jTextFieldPtoG.text")); // NOI18N
        jTextFieldPtoG.setName("jTextFieldPtoG"); // NOI18N
        jTextFieldPtoG.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldPtoGKeyReleased(evt);
            }
        });

        jLabel28.setText(resourceMap.getString("jLabel28.text")); // NOI18N
        jLabel28.setName("jLabel28"); // NOI18N

        jTextFieldGtoP.setName("jTextFieldGtoP"); // NOI18N
        jTextFieldGtoP.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldGtoPKeyReleased(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel22)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldPtoG, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel28)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldGtoP, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(jTextFieldPtoG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel28)
                    .addComponent(jTextFieldGtoP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel6.border.title"))); // NOI18N
        jPanel6.setName("jPanel6"); // NOI18N

        jLabel31.setText(resourceMap.getString("jLabel31.text")); // NOI18N
        jLabel31.setName("jLabel31"); // NOI18N

        jLabel37.setText(resourceMap.getString("jLabel37.text")); // NOI18N
        jLabel37.setName("jLabel37"); // NOI18N

        jTextFieldLtoK.setText(resourceMap.getString("jTextFieldLtoK.text")); // NOI18N
        jTextFieldLtoK.setName("jTextFieldLtoK"); // NOI18N
        jTextFieldLtoK.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldLtoKKeyReleased(evt);
            }
        });

        jTextFieldKtoL.setName("jTextFieldKtoL"); // NOI18N
        jTextFieldKtoL.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldKtoLKeyReleased(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel31)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldLtoK, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel37)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldKtoL, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(99, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel31)
                    .addComponent(jTextFieldLtoK, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel37)
                    .addComponent(jTextFieldKtoL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel5.border.title"))); // NOI18N
        jPanel5.setName("jPanel5"); // NOI18N

        jLabel29.setText(resourceMap.getString("jLabel29.text")); // NOI18N
        jLabel29.setName("jLabel29"); // NOI18N

        jTextFieldHecto.setName("jTextFieldHecto"); // NOI18N
        jTextFieldHecto.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldHectoKeyReleased(evt);
            }
        });

        jLabelGallon.setText(resourceMap.getString("jLabelGallon.text")); // NOI18N
        jLabelGallon.setName("jLabelGallon"); // NOI18N

        jTextFieldGallon.setName("jTextFieldGallon"); // NOI18N
        jTextFieldGallon.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldGallonKeyReleased(evt);
            }
        });

        jLabelGallon1.setText(resourceMap.getString("jLabelGallon1.text")); // NOI18N
        jLabelGallon1.setName("jLabelGallon1"); // NOI18N

        jTextFieldBBL.setName("jTextFieldBBL"); // NOI18N
        jTextFieldBBL.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldBBLKeyReleased(evt);
            }
        });

        jLabelGallon2.setText(resourceMap.getString("jLabelGallon2.text")); // NOI18N
        jLabelGallon2.setName("jLabelGallon2"); // NOI18N

        jTextFieldLiter.setName("jTextFieldLiter"); // NOI18N
        jTextFieldLiter.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldLiterKeyReleased(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel29)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldHecto, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabelGallon)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldGallon, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabelGallon1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldBBL, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabelGallon2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldLiter, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(124, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel29)
                    .addComponent(jTextFieldHecto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelGallon)
                    .addComponent(jTextFieldGallon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelGallon1)
                    .addComponent(jTextFieldBBL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelGallon2)
                    .addComponent(jTextFieldLiter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel7.border.title"))); // NOI18N
        jPanel7.setName("jPanel7"); // NOI18N

        jLabel30.setText(resourceMap.getString("jLabel30.text")); // NOI18N
        jLabel30.setName("jLabel30"); // NOI18N

        jTextFieldmL.setName("jTextFieldmL"); // NOI18N
        jTextFieldmL.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldmLKeyReleased(evt);
            }
        });

        jLabel38.setText(resourceMap.getString("jLabel38.text")); // NOI18N
        jLabel38.setName("jLabel38"); // NOI18N

        jTextFieldOz.setName("jTextFieldOz"); // NOI18N
        jTextFieldOz.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldOzKeyReleased(evt);
            }
        });

        jLabel39.setText(resourceMap.getString("jLabel39.text")); // NOI18N
        jLabel39.setName("jLabel39"); // NOI18N

        jTextFieldQuarts.setName("jTextFieldQuarts"); // NOI18N
        jTextFieldQuarts.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldQuartsKeyReleased(evt);
            }
        });

        jLabel40.setText(resourceMap.getString("jLabel40.text")); // NOI18N
        jLabel40.setName("jLabel40"); // NOI18N

        jTextFieldGal.setName("jTextFieldGal"); // NOI18N
        jTextFieldGal.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldGalKeyReleased(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel30)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldmL, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel38)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldOz, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel39)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldQuarts, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel40)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldGal, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(129, Short.MAX_VALUE))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel30)
                    .addComponent(jTextFieldmL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel38)
                    .addComponent(jTextFieldOz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39)
                    .addComponent(jTextFieldQuarts, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel40)
                    .addComponent(jTextFieldGal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel8.border.title"))); // NOI18N
        jPanel8.setName("jPanel8"); // NOI18N

        jLabel41.setText(resourceMap.getString("jLabel41.text")); // NOI18N
        jLabel41.setName("jLabel41"); // NOI18N

        jTextFieldmg.setName("jTextFieldmg"); // NOI18N
        jTextFieldmg.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldmgKeyReleased(evt);
            }
        });

        jLabel42.setText(resourceMap.getString("jLabel42.text")); // NOI18N
        jLabel42.setName("jLabel42"); // NOI18N

        jTextFieldgram.setName("jTextFieldgram"); // NOI18N
        jTextFieldgram.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldgramKeyReleased(evt);
            }
        });

        jLabel43.setText(resourceMap.getString("jLabel43.text")); // NOI18N
        jLabel43.setName("jLabel43"); // NOI18N

        jTextFieldounces.setName("jTextFieldounces"); // NOI18N
        jTextFieldounces.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldouncesKeyReleased(evt);
            }
        });

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel41)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldmg, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel42)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldgram, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel43)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldounces, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(265, Short.MAX_VALUE))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel41)
                    .addComponent(jTextFieldmg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel42)
                    .addComponent(jTextFieldgram, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel43)
                    .addComponent(jTextFieldounces, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel9.border.title"))); // NOI18N
        jPanel9.setName("jPanel9"); // NOI18N

        jLabel44.setText(resourceMap.getString("jLabel44.text")); // NOI18N
        jLabel44.setName("jLabel44"); // NOI18N

        jTextFieldC.setName("jTextFieldC"); // NOI18N
        jTextFieldC.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldCKeyReleased(evt);
            }
        });

        jLabel45.setText(resourceMap.getString("jLabel45.text")); // NOI18N
        jLabel45.setName("jLabel45"); // NOI18N

        jTextFieldF.setName("jTextFieldF"); // NOI18N
        jTextFieldF.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldFKeyReleased(evt);
            }
        });

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel44)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldC, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel45)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldF, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel44)
                    .addComponent(jTextFieldC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel45)
                    .addComponent(jTextFieldF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel3.TabConstraints.tabTitle"), jPanel3); // NOI18N

        jButtonExitTools.setAction(actionMap.get("ExitTools")); // NOI18N
        jButtonExitTools.setText(resourceMap.getString("jButtonExitTools.text")); // NOI18N
        jButtonExitTools.setName("jButtonExitTools"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 658, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(597, Short.MAX_VALUE)
                .addComponent(jButtonExitTools)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 437, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonExitTools)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jTextFieldLtoKKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldLtoKKeyReleased
        // TODO add your handling code here:
        double kg = Double.valueOf(jTextFieldLtoK.getText().trim()).doubleValue();
        double lbs = kg * (double)2.20462262;
        jTextFieldKtoL.setText(f2.format(lbs));
    }//GEN-LAST:event_jTextFieldLtoKKeyReleased

    private void jTextFieldKtoLKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldKtoLKeyReleased
        // TODO add your handling code here:
        double lbs = Double.valueOf(jTextFieldKtoL.getText().trim()).doubleValue();
        double kg = lbs * (double)0.45359237;
        jTextFieldLtoK.setText(f2.format(kg));
    }//GEN-LAST:event_jTextFieldKtoLKeyReleased

    private void jTextFieldPtoGKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldPtoGKeyReleased
        // TODO add your handling code here:
        double plato = Double.valueOf(jTextFieldPtoG.getText().trim()).doubleValue();
        double gravity = PlatotoSG(plato);
        jTextFieldGtoP.setText(f3.format(gravity));
    }//GEN-LAST:event_jTextFieldPtoGKeyReleased

    private void jTextFieldGtoPKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldGtoPKeyReleased
        // TODO add your handling code here:
        double gravity = Double.valueOf(jTextFieldGtoP.getText().trim()).doubleValue();
        double plato = SGtoPlato(gravity);
        jTextFieldPtoG.setText(f2.format(plato));
    }//GEN-LAST:event_jTextFieldGtoPKeyReleased

    private void jTextFieldHectoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldHectoKeyReleased
        // TODO add your handling code here:
        double hectoliter = Double.valueOf(jTextFieldHecto.getText().trim()).doubleValue();
        double liter = hectoliter * (double)100;
        double bbl = hectoliter * (double)0.852167911;
        double gallon = hectoliter * (double)26.4172052;
        jTextFieldLiter.setText(f2.format(liter));
        jTextFieldBBL.setText(f2.format(bbl));
        jTextFieldGallon.setText(f2.format(gallon));
    }//GEN-LAST:event_jTextFieldHectoKeyReleased

    private void jTextFieldGallonKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldGallonKeyReleased
        // TODO add your handling code here:
        double gallon = Double.valueOf(jTextFieldGallon.getText().trim()).doubleValue();
        double hectoliter = gallon * (double)0.0378541178;
        double liter = gallon * (double)3.78541178;
        double bbl = gallon * (double)0.0322580645;
        jTextFieldHecto.setText(f2.format(hectoliter));
        jTextFieldLiter.setText(f2.format(liter));
        jTextFieldBBL.setText(f2.format(bbl));
    }//GEN-LAST:event_jTextFieldGallonKeyReleased

    private void jTextFieldBBLKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldBBLKeyReleased
        // TODO add your handling code here:
        double bbl = Double.valueOf(jTextFieldBBL.getText().trim()).doubleValue();
        double hectoliter = bbl * (double)1.17347765;
        double liter = bbl * (double)117.347765;
        double gallon = bbl * (double)31;
        jTextFieldHecto.setText(f2.format(hectoliter));
        jTextFieldLiter.setText(f2.format(liter));
        jTextFieldGallon.setText(f2.format(gallon));
    }//GEN-LAST:event_jTextFieldBBLKeyReleased

    private void jTextFieldLiterKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldLiterKeyReleased
        // TODO add your handling code here:
        double liter = Double.valueOf(jTextFieldLiter.getText().trim()).doubleValue();
        double bbl = liter * (double)0.00852167911;
        double gallon = liter * (double)0.264172052;
        double hectoliter = liter * (double)0.01;
        jTextFieldBBL.setText(f2.format(bbl));
        jTextFieldGallon.setText(f2.format(gallon));
        jTextFieldHecto.setText(f2.format(hectoliter));
    }//GEN-LAST:event_jTextFieldLiterKeyReleased

    private void jTextFieldmLKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldmLKeyReleased
        // TODO add your handling code here:
        double ml = Double.valueOf(jTextFieldmL.getText().trim()).doubleValue();
        double oz = ml * (double)0.0338140227;
        double quarts = ml * (double)0.00105668821;
        double gal = ml * (double)0.000264172052;
        jTextFieldOz.setText(f2.format(oz));
        jTextFieldQuarts.setText(f2.format(quarts));
        jTextFieldGal.setText(f2.format(gal));
    }//GEN-LAST:event_jTextFieldmLKeyReleased

    private void jTextFieldOzKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldOzKeyReleased
        // TODO add your handling code here:
        double oz = Double.valueOf(jTextFieldOz.getText().trim()).doubleValue();
        double ml = oz * (double)29.5735296;
        double quarts = oz * (double)0.03125;
        double gal = oz * (double)0.0078125;
        jTextFieldmL.setText(f2.format(ml));
        jTextFieldQuarts.setText(f2.format(quarts));
        jTextFieldGal.setText(f2.format(gal));
    }//GEN-LAST:event_jTextFieldOzKeyReleased

    private void jTextFieldQuartsKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldQuartsKeyReleased
        // TODO add your handling code here:
        double quarts = Double.valueOf(jTextFieldQuarts.getText().trim()).doubleValue();
        double ml = quarts * (double)946.352946;
        double oz = quarts * (double)32;
        double gal = quarts * (double)0.25;
        jTextFieldmL.setText(f2.format(ml));
        jTextFieldOz.setText(f2.format(oz));
        jTextFieldGal.setText(f2.format(gal));
    }//GEN-LAST:event_jTextFieldQuartsKeyReleased

    private void jTextFieldGalKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldGalKeyReleased
        // TODO add your handling code here:
        double gal = Double.valueOf(jTextFieldGal.getText().trim()).doubleValue();
        double ml = gal * (double)3785.41178;
        double oz = gal * (double)128;
        double quarts = gal * (double)4;
        jTextFieldmL.setText(f2.format(ml));
        jTextFieldOz.setText(f2.format(oz));
        jTextFieldQuarts.setText(f2.format(quarts));
    }//GEN-LAST:event_jTextFieldGalKeyReleased

    private void jTextFieldmgKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldmgKeyReleased
        // TODO add your handling code here:
        double mg = Double.valueOf(jTextFieldmg.getText().trim()).doubleValue();
        double gram = mg * (double)0.001;
        double ounces = mg * (double)0.0000352739619;
        jTextFieldgram.setText(f2.format(gram));
        jTextFieldounces.setText(f2.format(ounces));
    }//GEN-LAST:event_jTextFieldmgKeyReleased

    private void jTextFieldgramKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldgramKeyReleased
        // TODO add your handling code here:
        double gram = Double.valueOf(jTextFieldgram.getText().trim()).doubleValue();
        double mg = gram * (double)1000;
        double ounces = gram * (double)0.0352739619;
        jTextFieldmg.setText(f2.format(mg));
        jTextFieldounces.setText(f2.format(ounces));
    }//GEN-LAST:event_jTextFieldgramKeyReleased

    private void jTextFieldouncesKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldouncesKeyReleased
        // TODO add your handling code here:
        double ounces = Double.valueOf(jTextFieldounces.getText().trim()).doubleValue();
        double gram = ounces * (double)28.3495231;
        double mg = ounces * (double)28349.5231;
        jTextFieldgram.setText(f2.format(gram));
        jTextFieldmg.setText(f2.format(mg));
    }//GEN-LAST:event_jTextFieldouncesKeyReleased

    private void jTextFieldCKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldCKeyReleased
        // TODO add your handling code here:
        double c = Double.valueOf(jTextFieldC.getText().trim()).doubleValue();
        double f = ((c * ((double)9/(double)5)) + 32);
        jTextFieldF.setText(f2.format(f));
    }//GEN-LAST:event_jTextFieldCKeyReleased

    private void jTextFieldFKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldFKeyReleased
        // TODO add your handling code here:
        double f = Double.valueOf(jTextFieldF.getText().trim()).doubleValue();
        double c = ((f - (double)32)*((double)5/(double)9));
        jTextFieldC.setText(f2.format(c));
    }//GEN-LAST:event_jTextFieldFKeyReleased

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ToolsFrame().setVisible(true);
            }
        });
    }

    @Action
    public void CalcStats() {
        //Get values entered.
        double ogUn = Double.valueOf(jTextFieldOG.getText().trim()).doubleValue();
        double tgUn = Double.valueOf(jTextFieldTG.getText().trim()).doubleValue();
        double tempOG = Double.valueOf(jTextFieldOGTemp.getText().trim()).doubleValue();
        double tempTG = Double.valueOf(jTextFieldTGTemp.getText().trim()).doubleValue();

        //Check temps, if and convert to celsius.
        double tempOGC = 0;
        double tempTGC = 0;
        if(jRadioButtonOGF.isSelected()){
            tempOGC = ((tempOG - (double)32.0)*((double)5/(double)9));
        } else {
            tempOGC = tempOG;
        }
        if(jRadioButtonTGF.isSelected()){
            tempTGC = ((tempTG - (double)32.0)*((double)5/(double)9));
        } else {
            tempTGC = tempTG;
        }

        //Get corrected gravities based on temperatures.
        double ogCor = deltaSG(tempOGC,ogUn);
        double tgCor = deltaSG(tempTGC,tgUn);

        //Display the corrected values.
        jLabelOGCor.setText(f3.format(ogCor));
        jLabelTGCor.setText(f3.format(tgCor));

        //Calculate the abw and abv from corrected values.
        double abw = (ogCor - tgCor) * (double)105;
        double abv = (ogCor - tgCor) * (double)132.715;
        jLabelABW.setText(f2.format(abw) + "%");
        jLabelABV.setText(f2.format(abv) + "%");

        //Calculate Apparant Degree of Attenuation.
        double ada = (double)100*((ogCor-tgCor)/(ogCor-(double)1));
        jLabelADA.setText(f2.format(ada) + "%");
    }

    public double deltaSG(double temp, double SG){
        double coeffic[][] = {{56.084,   -0.17885,   -0.13063},    // 0-4.99
                              {69.685,   -1.367,     -0.10621},    // 5 - 9.99
	                      {77.782,   -1.7288,    -0.10822},    // 10 - 14.99
	                      {87.895,   -2.3601,    -0.10285},    // 15 - 19.99
	                      {97.052,   -2.7729,    -0.10596}};   // 20 - 24.99

        double plato = SGtoPlato(SG);
        int coefficIndex = 4;
        if(plato < 20){
            coefficIndex = 3;
        } else {
            if (plato < 15) coefficIndex = 2;
            if (plato < 10) coefficIndex = 1;
            if (plato < 5) coefficIndex = 0;
        }

        double deltaSG = (coeffic[coefficIndex][0])
	                   + (coeffic[coefficIndex][1] * temp)
	                   + (coeffic[coefficIndex][2] * temp * temp);

        double CorrectedSG = PlatotoSG(plato - (deltaSG/100));
        return CorrectedSG;
    }

    public static double SGtoPlato(double SG){
        double plato;
        plato = -616.989 + 1111.488*SG - 630.606*SG*SG + 136.10305*SG*SG*SG;
	return plato;
    }

    public static double PlatotoSG(double plato){
        double SG;
        SG = 1.0000131 + 0.00386777*plato + 1.27447E-5*plato*plato + 6.34964E-8*plato*plato*plato;
	return SG;
    }

    @Action
    public void ExitTools() {
        dispose();
    }

    @Action
    public void CalcPriming() {
        //Get volume and display conversions.
        double VolumeBBL = Double.valueOf(jTextFieldVolume.getText().trim()).doubleValue();
        double VolumeGal = VolumeBBL * (double)31;
        double VolumeLiter = VolumeGal * (double)3.78541178;
        jLabelVolGal.setText(f2.format(VolumeGal));
        jLabelVolL.setText(f2.format(VolumeLiter));

        //Get Residual sugars.
        double sg = Double.valueOf(jTextFieldSG.getText().trim()).doubleValue();
        double plato = SGtoPlato(sg);
        jLabelPlato.setText(f2.format(plato));
        
        //Get Carbonation Values.
        double tCarb = Double.valueOf(jTextFieldTCarb.getText().trim()).doubleValue();
        double nCarb = Double.valueOf(jTextFieldNatCarb.getText().trim()).doubleValue();

        //Calculate Sugar addtions needed.
        double sugarAdd = ((tCarb-nCarb)*(double)4)-((double)0.66*plato*(double)10);
        jLabelSugar.setText(f2.format(sugarAdd));
        double totVol = ((VolumeLiter * sugarAdd * (double)2)/(double)1000) + VolumeLiter;
        jLabelTotVol.setText(f2.format(totVol));
        double totalSugar = (totVol * sugarAdd) / 1000;
        double waterPrime = totalSugar * 2;
        jLabelPrimeSugar.setText(f2.format(totalSugar));
        jLabelPrimeWater.setText(f2.format(waterPrime));

        //Calculate Yeast Pitching
        double cellml = (double)2000000;
        jLabelPitchRate.setText(f0.format(cellml));
        double estcell = 2e10;
        jLabelCells.setText(f0.format(estcell));
        double totalcells = (cellml*VolumeLiter*(double)1000);
        jLabelTotalCells.setText(f0.format(totalcells));
        double gramYeastReq = totalcells / estcell;
        double hydSol = gramYeastReq * (double)10;
        double cornSugar = hydSol * (double)0.02;
        jLabelYeastGrams.setText(f2.format(gramYeastReq));
        jLabelHydSolution.setText(f2.format(hydSol));
        jLabelHydSugar.setText(f2.format(cornSugar));


    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroupOG;
    private javax.swing.ButtonGroup buttonGroupTG;
    private javax.swing.JButton jButtonCalcPriming;
    private javax.swing.JButton jButtonCalcStats;
    private javax.swing.JButton jButtonExitTools;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabelABV;
    private javax.swing.JLabel jLabelABW;
    private javax.swing.JLabel jLabelADA;
    private javax.swing.JLabel jLabelCells;
    private javax.swing.JLabel jLabelGallon;
    private javax.swing.JLabel jLabelGallon1;
    private javax.swing.JLabel jLabelGallon2;
    private javax.swing.JLabel jLabelHydSolution;
    private javax.swing.JLabel jLabelHydSugar;
    private javax.swing.JLabel jLabelOG;
    private javax.swing.JLabel jLabelOG1;
    private javax.swing.JLabel jLabelOG2;
    private javax.swing.JLabel jLabelOGCor;
    private javax.swing.JLabel jLabelPitchRate;
    private javax.swing.JLabel jLabelPlato;
    private javax.swing.JLabel jLabelPrimeSugar;
    private javax.swing.JLabel jLabelPrimeWater;
    private javax.swing.JLabel jLabelSugar;
    private javax.swing.JLabel jLabelTG;
    private javax.swing.JLabel jLabelTG1;
    private javax.swing.JLabel jLabelTGCor;
    private javax.swing.JLabel jLabelTotVol;
    private javax.swing.JLabel jLabelTotalCells;
    private javax.swing.JLabel jLabelVolGal;
    private javax.swing.JLabel jLabelVolL;
    private javax.swing.JLabel jLabelYeastGrams;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JRadioButton jRadioButtonOGC;
    private javax.swing.JRadioButton jRadioButtonOGF;
    private javax.swing.JRadioButton jRadioButtonTGC;
    private javax.swing.JRadioButton jRadioButtonTGF;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextField jTextFieldBBL;
    private javax.swing.JTextField jTextFieldC;
    private javax.swing.JTextField jTextFieldF;
    private javax.swing.JTextField jTextFieldGal;
    private javax.swing.JTextField jTextFieldGallon;
    private javax.swing.JTextField jTextFieldGtoP;
    private javax.swing.JTextField jTextFieldHecto;
    private javax.swing.JTextField jTextFieldKtoL;
    private javax.swing.JTextField jTextFieldLiter;
    private javax.swing.JTextField jTextFieldLtoK;
    private javax.swing.JTextField jTextFieldNatCarb;
    private javax.swing.JTextField jTextFieldOG;
    private javax.swing.JTextField jTextFieldOGTemp;
    private javax.swing.JTextField jTextFieldOz;
    private javax.swing.JTextField jTextFieldPtoG;
    private javax.swing.JTextField jTextFieldQuarts;
    private javax.swing.JTextField jTextFieldSG;
    private javax.swing.JTextField jTextFieldTCarb;
    private javax.swing.JTextField jTextFieldTG;
    private javax.swing.JTextField jTextFieldTGTemp;
    private javax.swing.JTextField jTextFieldVolume;
    private javax.swing.JTextField jTextFieldgram;
    private javax.swing.JTextField jTextFieldmL;
    private javax.swing.JTextField jTextFieldmg;
    private javax.swing.JTextField jTextFieldounces;
    // End of variables declaration//GEN-END:variables

}
